﻿<!doctype html>
<html>
<head>
    <title>SpreadJS - Change Value</title>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>

    <link href="../../../external/spreadjs/css/gcspread.sheets.excel2013white.9.40.20161.0.css" rel="stylesheet" type="text/css" />

    <script src="../../../external/external/jquery-1.8.2.min.js" type="text/javascript"></script>

    <script type="text/javascript" src="../../../external/spreadjs/gcspread.sheets.all.9.40.20161.0.min.js"></script>

    <style type="text/css">
        /*css_begin*/
        label {
            display:inline-block;
            width: 180px;
        }
        /*css_end*/
    </style>

    <script id="scriptInit" type="text/javascript">
    /*code_begin*/
    $(document).ready(function () {
        var spread = new GcSpread.Sheets.Spread(document.getElementById("ss"), { sheetCount: 1 });
        initSpread(spread);
    });

    function initSpread(spread) {
        $("#chkShowDragDropTip").click(function () {
            spread.showDragDropTip($("#chkShowDragDropTip").prop("checked"));
        });
        $("#chkCanUserDragDrop").click(function () {
            spread.canUserDragDrop($("#chkCanUserDragDrop").prop("checked"));
        });
        $("#cutCopyIndicatorVisible").change(function () {
            var value = $("#cutCopyIndicatorVisible").prop("checked");
            spread.cutCopyIndicatorVisible(value);
        });
        $("#setCutCopyIndicatorBorderColor").click(function () {
            var value = $("#cutCopyIndicatorBorderColor").val();
            spread.cutCopyIndicatorBorderColor(value);
        });
        $("#setIsProtected").click(function () {
            var sheet = spread.getActiveSheet();
            var value = $("#setIsProtected").prop("checked");
            sheet.setIsProtected(value);
        });
    }
    /*code_end*/
    </script>
</head>
<body>
<div class="sample-turtorial">
    <div id="ss" style="width:100%; height:340px;border: 1px solid gray;"></div>
    <div class="demo-options">
        <div class="option-row">
            <input id="chkCanUserDragDrop" type="checkbox" checked="checked" />
            <label for="chkCanUserDragDrop">CanUserDragDrop</label>
            <input id="chkShowDragDropTip" type="checkbox" checked="checked" />
            <label for="chkShowDragDropTip">ShowDragDropTip</label>
        </div>
        <div class="option-row">
            <input type="checkbox" id="cutCopyIndicatorVisible" checked="checked" />
            <label for="cutCopyIndicatorVisible">CutCopyIndicatorVisible</label>
            <input type="checkbox" id="setIsProtected" />
            <label for="setIsProtected">IsProtected</label>
        </div>
        <div class="option-row">
            <label style="width:auto;">Cut/Copy Indicator Border Color:</label>
            <input type="text" style="width: 90px;" id="cutCopyIndicatorBorderColor" />
            <input type="button" value="Set" id="setCutCopyIndicatorBorderColor"/>
        </div>
    </div>
</div>
</body>
</html>